dépôts
/
lhc
/
web
/
wiklou.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
bf8c5d7
)
* API: fixed titleToKey() to convert values to upper case.
author
Yuri Astrakhan
<yurik@users.mediawiki.org>
Mon, 16 Oct 2006 02:14:10 +0000
(
02:14
+0000)
committer
Yuri Astrakhan
<yurik@users.mediawiki.org>
Mon, 16 Oct 2006 02:14:10 +0000
(
02:14
+0000)
includes/api/ApiQueryBase.php
patch
|
blob
|
history
diff --git
a/includes/api/ApiQueryBase.php
b/includes/api/ApiQueryBase.php
index
0f8a17f
..
09fd391
100644
(file)
--- a/
includes/api/ApiQueryBase.php
+++ b/
includes/api/ApiQueryBase.php
@@
-74,7
+74,15
@@
abstract class ApiQueryBase extends ApiBase {
return $this->mQueryModule->getPageSet();
}
+ /**
+ * This is a very simplistic utility function
+ * to convert a title string to a db key.
+ * It will replace all ' ' with '_', and make first letter uppercase
+ */
public static function titleToKey($title) {
+ global $wgContLang, $wgCapitalLinks;
+ if ($wgCapitalLinks)
+ $title = $wgContLang->ucfirst( $title );
return str_replace(' ', '_', $title);
}